.class final Lnet/tsapps/topdeals/bm;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private synthetic a:Lnet/tsapps/topdeals/DetailActitivty;


# direct methods
.method constructor <init>(Lnet/tsapps/topdeals/DetailActitivty;)V
    .locals 0

    iput-object p1, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 8

    const-wide/high16 v6, 0x4059

    iget-object v0, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->k(Lnet/tsapps/topdeals/DetailActitivty;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lnet/tsapps/topdeals/DetailActitivty;->a(Lnet/tsapps/topdeals/DetailActitivty;Z)V

    iget-object v0, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v0

    iget-wide v0, v0, Lnet/tsapps/topdeals/objects/Deal;->e:D

    iget-object v2, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v2}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v2

    iget-wide v2, v2, Lnet/tsapps/topdeals/objects/Deal;->c:D

    sub-double/2addr v0, v2

    mul-double/2addr v0, v6

    invoke-static {v0, v1}, Ljava/lang/Math;->round(D)J

    move-result-wide v0

    long-to-double v0, v0

    div-double/2addr v0, v6

    iget-object v2, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v2}, Lnet/tsapps/topdeals/DetailActitivty;->l(Lnet/tsapps/topdeals/DetailActitivty;)Landroid/widget/TextView;

    move-result-object v2

    const/high16 v3, 0x4148

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setTextSize(F)V

    iget-object v2, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v2}, Lnet/tsapps/topdeals/DetailActitivty;->l(Lnet/tsapps/topdeals/DetailActitivty;)Landroid/widget/TextView;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "-"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v4}, Lnet/tsapps/topdeals/DetailActitivty;->h(Lnet/tsapps/topdeals/DetailActitivty;)Landroid/content/Context;

    move-result-object v4

    invoke-static {v4, v0, v1}, Lnet/tsapps/topdeals/f/b;->a(Landroid/content/Context;D)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\u20ac"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lnet/tsapps/topdeals/DetailActitivty;->a(Lnet/tsapps/topdeals/DetailActitivty;Z)V

    iget-object v0, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v0

    iget-wide v0, v0, Lnet/tsapps/topdeals/objects/Deal;->e:D

    div-double v0, v6, v0

    iget-object v2, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v2}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v2

    iget-wide v2, v2, Lnet/tsapps/topdeals/objects/Deal;->e:D

    iget-object v4, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v4}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v4

    iget-wide v4, v4, Lnet/tsapps/topdeals/objects/Deal;->c:D

    sub-double/2addr v2, v4

    mul-double/2addr v0, v2

    mul-double/2addr v0, v6

    invoke-static {v0, v1}, Ljava/lang/Math;->round(D)J

    move-result-wide v0

    const-wide/16 v2, 0x64

    div-long/2addr v0, v2

    long-to-double v0, v0

    new-instance v2, Ljava/lang/Double;

    invoke-direct {v2, v0, v1}, Ljava/lang/Double;-><init>(D)V

    iget-object v0, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->l(Lnet/tsapps/topdeals/DetailActitivty;)Landroid/widget/TextView;

    move-result-object v0

    const/high16 v1, 0x4180

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextSize(F)V

    iget-object v0, p0, Lnet/tsapps/topdeals/bm;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->l(Lnet/tsapps/topdeals/DetailActitivty;)Landroid/widget/TextView;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v3, "-"

    invoke-direct {v1, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v2}, Ljava/lang/Double;->intValue()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "%"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0
.end method
